<?php

require 'cookiedisclaimer.php.inc';

?>
<link href="default.css" rel="stylesheet" type="text/css" />
<body style="margin: 0; font-family: Verdana, Arial">
<?php

// DAO
require 'BoardDAO.php.inc';

// load default data
$path = request('path') == null ? '' : request('path');
$page = request('page') == null ? 1 : request('page');
$full = request('full') == null ? false : true;
$date = request('date') == null ? false : true;
$desc = request('desc') == null ? true : true;
$desc = request('asc') == null ? $desc : false;

require 'bumpandsage.php.inc';
require 'post.php.inc';
require 'headerandpostform.php.inc';
require 'parentmessage.php.inc';
require 'addthis_start.tpl';

?>
<script src="jquery.js"></script>
<script src="default.js"></script>
<?php

require 'showmessages.php.inc';

if(count($messages) > 0)
	require 'addthis_end.tpl';

if(count($messages) == BoardDAO::$PageSize)
	require 'moar.tpl';

require 'footer.tpl';

?>
<script>
$('.text').each(function(index) 
	{
		$(this).html( replaceUrls( $(this).text() ) );
  	});
$('.score').each(function(index)
	{
		var text = $(this).text();
		var score = text.substring(7);
		if(score > 20) score = 20;
		var starsHTML = ''; 
		for(var i = 0; i < score; ++ i)
		{
			starsHTML += '<div class="star"></div>';
		}
		$(this).html(starsHTML);
	});
</script>